﻿var geocoder = null;
function showAddress(address) {
    geocoder = new GClientGeocoder();
    if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
              if (!point) {
                  alert("不能解析: " + address);
              } else {
              map.clearOverlays();
                  map.setCenter(point, 13);
                  var marker = new GMarker(point);
                  map.addOverlay(marker);
                  marker.openInfoWindowHtml(address);
              }
          }
        );
    }
}